package com.he.hsdyc.model.vo;

import com.he.hsdyc.model.User2;
import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @Author :
 * @Description :
 * @Date : Created in 20:10 2017/11/2
 * @Modified By : NONE
 */
/*@Data
@NoArgsConstructor
@AllArgsConstructor*/
@ApiModel("用户注册请求")
public class UserRegisterRequest {

    public User2 reslover() {
        User2 user2 = new User2();
        user2.setMobile(this.mobile);
        user2.setPassword(this.password);
        return user2;
    }

    @NotNull(message = "登录账号不能为空")
//    @Pattern(regexp = RegExps.MOBILE,message = "手机号格式错误")
    private String mobile;

    @NotNull(message = "密码不能为空")
    @Length(max = 16,min = 4,message = "密码长度为4-16位")
    private String password;


    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
